﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProfilePage.aspx.cs" Inherits="ProfilePage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Profile Management</title>
    <link rel="Stylesheet" href="Resources/Styles/Default.css" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div id ="errorHeader">
        <asp:Label ID="lblErr" runat="server" Text="" />
    </div>
    <div>
        <asp:Panel ID="pnlMainMenu" runat="server" Visible="false">
            <div style="CenterMenu">
                <fieldset>
                    <legend>Select an option</legend>
                    <asp:Button ID="btnShowLoginPanel" runat="server" Text="Log in to an existing account" />
                    <br />
                    <asp:Button ID="btnShowNewUserPanel" runat="server" Text="Create a new acount" />
                </fieldset>
            </div>
        </asp:Panel>
        <asp:Panel ID="pnlLogin" runat="server" Visible="false">
            <div style="CenterMenu">
                <fieldset>
                    <legend>Log In</legend>
                    User Name: <asp:TextBox ID="txtUserName" runat="server" /><asp:RequiredFieldValidator ControlToValidate="txtUserName" ID="Validator1" runat="server"
                                ValidationGroup="Login" Display="Dynamic" Text="*" />
                    <br />
                    Password: <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" /><asp:RequiredFieldValidator ControlToValidate="txtPassword" ID="RequiredFieldValidator1" runat="server"
                                ValidationGroup="Login" Display="Dynamic" Text="*" />
                    <br />
                    <asp:Button ID="btnLogin" ValidationGroup="Login" Text="Log in" runat="server" />
                </fieldset>
            </div>
        </asp:Panel>
        <asp:Panel ID="pnlCreateNewUser" runat="server" Visible="false">
            <div style="CenterMenu">
                <fieldset>
                    <legend>Register</legend>
                    User Name: <asp:TextBox ID="txtNewUserName" runat="server" /><asp:RequiredFieldValidator ControlToValidate="txtNewUserName" ID="RequiredFieldValidator2" runat="server"
                                ValidationGroup="Register" Display="Dynamic" Text="*" />
                    <br />
                    Password: <asp:TextBox ID="txtNewUserPassword" runat="server" TextMode="Password" /><asp:RequiredFieldValidator ControlToValidate="txtNewUserPassword" ID="RequiredFieldValidator3" runat="server"
                                ValidationGroup="Register" Display="Dynamic" Text="*" />
                    <br />
                    <asp:Button ID="btnCreateNewUser" ValidationGroup="Register" Text="Log in" runat="server" />
                </fieldset>
            </div>
        </asp:Panel>
        <asp:Panel ID="pnlProfile" runat="server" Visible="false">
            <div ID="CenterMenu">
                <fieldset>
                    <legend>User Profile</legend>
                    Currently logged in as <%= LoggedInUserName %><br />
                    <a href="SalesItems.aspx">Click Here to proceed to the sales items</a>
                    [user profile information]
                </fieldset>
            </div>
        </asp:Panel>
    </div>
    </form>
</body>
</html>
